home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf-IIb.43 / conf / uclvax2 / chan.c next >
Encoding:
C/C++ Source or Header  |  1986-02-01  |  3.2 KB  |  94 lines

  1. #include "util.h"
  2. #include "mmdf.h"
  3. #include "ch.h"
  4. #include "dm.h"
  5.  
  6. char    *ch_dflnam = "local";
  7.  
  8. Alias    *al_list = (Alias *)0;
  9.  
  10. /*******************  MAIL IDENTIFIER  SELECTION  ***********************/
  11.  
  12. /*
  13.  *      The global mid_enable controls the use of an alternate
  14.  *      mail name system refered to as Mail-Ids.  When mail-ids are
  15.  *      in use, login-ids and mail-ids are nolong bound to one another
  16.  *      by the system account database, and are bound only by mapping
  17.  *      tables.  The tables "mailids" and "users" will always be present
  18.  *      though they may not be used.  "mailids" maps a mailid to a
  19.  *      system account.  The table "users" maps a username to a mailid.
  20.  */
  21.  
  22. int     mid_enable = 0;
  23.  
  24. Table
  25.     tb_mailids =            /* Used in getpwmid() */
  26. {
  27.     "mailids", "Mail-ID to Username Mappings", "mailids", 0, 0l
  28. },
  29.     tb_users =              /* Used in getmailid() */
  30. {
  31.     "users", "Username to Mail-ID Mappings", "users", 0, 0l
  32. };
  33.  
  34. /*
  35.  *  The following set of structures provides a complete list of channels
  36.  *  known to MMDF.
  37.  *
  38.  *  It is followed by two arrays that list the channels in useful orders.
  39.  *
  40.  *  ch_tbsrch[] is a full list, of all known channels, and is primarily
  41.  *  used to guide the ch_table routines when treating the hostname space as
  42.  *  flat (linear).  It also is used by lnk_submit, for sorting the address
  43.  *  linked-list.
  44.  *
  45.  *  THE ORDER IS CRITICAL.  A hostname may appear in several tables, but
  46.  *  the first table checked will cause the hit.
  47.  *
  48.  *  One nice aspect of this is that, for example, you can have a standard
  49.  *  arpanet host table, but have some of its hosts actually get mail on a
  50.  *  different channel.  Simply place that table's entry earlier in the
  51.  *  ch_tbsrch[] list.
  52.  *
  53.  *  ch_exsrch[] is a list of channels that are processed by Deliver
  54.  *  (usually just when it does standard, default daemon processing).
  55.  *  Therefore, it need contain only those channels that are active and are
  56.  *  to be processed by the daemon.  Again, order is important.  Channels
  57.  *  are processed in the order listed.  This means that, typically, you
  58.  *  want ch_sloc to be first, unless you have the strange view that foreign
  59.  *  mail is more important than local...
  60.  */
  61. /* */
  62.  
  63. LOCVAR Chan *chsrch[NUMCHANS+1] =       /* order chan tables searched         */
  64. {
  65.     (Chan *) 0
  66. };
  67. Chan **ch_tbsrch = chsrch;
  68.  
  69. LOCVAR Chan *exsrch[NUMCHANS+1] =     /* order of active chan execution     */
  70. {
  71.     (Chan *) 0
  72. };
  73. Chan **ch_exsrch = exsrch;
  74.  
  75. LOCVAR Table *tblist[NUMTABLES+1] =    /* all known tables                   */
  76. {
  77.     (Table *) 0
  78. };
  79. Table **tb_list = tblist;
  80.  
  81. Chan * ch_ptrlist[NUMCHANS + 1];  /* can hold pointers to chans         */
  82.  
  83. LOCVAR Domain *dmlist[NUMDOMAINS];
  84. Domain **dm_list = dmlist;         /* all known domains                  */
  85.  
  86. int     tb_maxtables = NUMTABLES; /* max number of slots                */
  87. int     ch_maxchans = NUMCHANS;   /* max number of slots                */
  88. int     dm_maxtables = NUMDOMAINS; /* max number of slots                */
  89.  
  90. /* these should reflect the ACTUAL number of slots in use  */
  91. int     tb_numtables = 0;         /* actual number of slots used        */
  92. int     ch_numchans = 0;          /* actual number of channels          */
  93. int     dm_numtables = 0;         /* actual number of slots used        */
  94.